babl.git
8 years agoNEWS: update for 0.1.36
Øyvind Kolås [Fri, 10 Nov 2017 00:03:37 +0000 (01:03 +0100)]
NEWS: update for 0.1.36

8 years agoCIE: Make the Lab to RGB fast paths work with non-sRGB primaries
Debarshi Ray [Tue, 7 Nov 2017 09:52:44 +0000 (10:52 +0100)]
CIE: Make the Lab to RGB fast paths work with non-sRGB primaries

This is similar to commit 72a074df6545fcb3.

https://bugzilla.gnome.org/show_bug.cgi?id=790011

8 years agoCIE: Make the Lab to RGB fast paths as accurate as the reference
Debarshi Ray [Tue, 7 Nov 2017 09:38:12 +0000 (10:38 +0100)]
CIE: Make the Lab to RGB fast paths as accurate as the reference

This is similar to commit e17807f235557d5d.

https://bugzilla.gnome.org/show_bug.cgi?id=790011

8 years agobabl, sse2-float: fall back to slow, accurate path for large pow-2.4 inputs
Ell [Tue, 7 Nov 2017 20:44:39 +0000 (15:44 -0500)]
babl, sse2-float: fall back to slow, accurate path for large pow-2.4 inputs

The approximations we use for pow_24() and pow_1_24() diverge from
the actual function for large-enough input values.  This can lead
not just to inaccurate results, but also to infinities and NaNs,
especially when multiple conversions are strung in a row.

When the input value is large enough to produce notable divergence
(the difference between the approximate and actual values is ~1% at
the chosen limits,) fall back to a slower, but more accurate
version.

For the SSE2 float conversions, this results in an increase of ~5%
in conversion time, when all values are below the limit.  When most
values are above the limit, performance can be 10x slower or worse.

8 years agoexport-symbols: add babl_format_exists
Øyvind Kolås [Tue, 31 Oct 2017 19:48:23 +0000 (20:48 +0100)]
export-symbols: add babl_format_exists

8 years agobabl: add babl_format_exists
Øyvind Kolås [Tue, 31 Oct 2017 19:48:23 +0000 (20:48 +0100)]
babl: add babl_format_exists

A function to check if a specific format - by name - is already known by babl.
Should be used in conjunction with babl_format() for user supplied format
strings.

8 years agoCIE: Make the RGB to Lab fast paths work with non-sRGB primaries
Debarshi Ray [Tue, 31 Oct 2017 11:20:45 +0000 (12:20 +0100)]
CIE: Make the RGB to Lab fast paths work with non-sRGB primaries

The older constants were tied to sRGB primaries. Using the matrices
from the Babl space removes this restriction.

https://bugzilla.gnome.org/show_bug.cgi?id=789695

8 years agoCIE: Make the RGB to Lab fast paths as accurate as the reference
Debarshi Ray [Tue, 31 Oct 2017 08:43:53 +0000 (09:43 +0100)]
CIE: Make the RGB to Lab fast paths as accurate as the reference

The matrices used by the fast paths to convert from RGB to XYZ didn't
exactly match the reference matrices in the Babl space. This caused a
measurable error in their output.

https://bugzilla.gnome.org/show_bug.cgi?id=789695

8 years agoCIE: Use cbrt instead of pow for the reference XYZ to LAB conversion
Debarshi Ray [Tue, 31 Oct 2017 08:36:39 +0000 (09:36 +0100)]
CIE: Use cbrt instead of pow for the reference XYZ to LAB conversion

The fast-paths use an inlining-friendly version of cbrt(3). Using
something similar removes superficial differences between the two
conversion paths. It's not like the C library's cbrt(3) will perform
any worse than its own pow(3).

https://bugzilla.gnome.org/show_bug.cgi?id=789695

8 years agoCIE: Add conversion from "RGBA float" to "CIE Lab float"
Debarshi Ray [Sun, 29 Oct 2017 12:52:26 +0000 (13:52 +0100)]
CIE: Add conversion from "RGBA float" to "CIE Lab float"

Conversions from "RaGaBaA float" to "CIE Lab float", as seen when
using gegl:shadows-highlights" go via:
  "RaGaBaA float" to "RGBA float"
  "RGBA float"    to "RGB float"
  "RGB float"     to "CIE Lab float"

A direct conversion from "RaGaBaA float" to "CIE Lab float" in simple
C is hindered by the need to check every pixel's alpha value to avoid
dividing by zero. The pipeline stalls make it lose out to the look-up
table and SIMD based conversions to unassociated alpha.

However, we can trivially cut out the second step and still reduce
some memory traffic.

https://bugzilla.gnome.org/show_bug.cgi?id=789695

8 years agobabl: use snprintf instead of sprintf
Tobias Stoeckmann [Tue, 24 Oct 2017 18:02:15 +0000 (20:02 +0200)]
babl: use snprintf instead of sprintf

Using sprintf with environment variables is dangerous, because it can
easily lead to out of boundary writes on heap space.

While at it, replace sprintf calls with snprintf where proper
boundary checks are possible and required.

Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
8 years agobabl: properly handle large files on 32 bit systems
Tobias Stoeckmann [Fri, 13 Oct 2017 16:39:02 +0000 (18:39 +0200)]
babl: properly handle large files on 32 bit systems

If large file support is enabled on 32 bit systems, it is possible
to trigger an out of boundary write with files larger than 2 GB.

Always check if fseek and ftell are successful and if the file is
small enough to fit into memory.

Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
8 years agobabl: always end strncpy strings with NUL
Tobias Stoeckmann [Fri, 13 Oct 2017 17:25:01 +0000 (19:25 +0200)]
babl: always end strncpy strings with NUL

The function strncpy(3) does not guarantee to end the destination string
with NUL character if not enough space was available. This could happen
on systems which allow paths which are longer than 4096 characters.

Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
8 years agopost release version bump
Øyvind Kolås [Fri, 6 Oct 2017 13:16:25 +0000 (15:16 +0200)]
post release version bump

8 years agorelease 0.1.34, update NEWS
Øyvind Kolås [Fri, 6 Oct 2017 13:15:57 +0000 (15:15 +0200)]
release 0.1.34, update NEWS

8 years agoexport-symbols: add babl_backtrack for gimp-2.8
Øyvind Kolås [Thu, 5 Oct 2017 21:12:57 +0000 (23:12 +0200)]
export-symbols: add babl_backtrack for gimp-2.8

8 years agobabl: rearrange BablModel struct
Øyvind Kolås [Wed, 4 Oct 2017 14:47:39 +0000 (16:47 +0200)]
babl: rearrange BablModel struct

Babl is doing casting that relies on BablFormat / BablModel having the same
layout for shared members.

8 years agobabl: do not use model.data for storing original model backpointer
Øyvind Kolås [Wed, 4 Oct 2017 14:16:45 +0000 (16:16 +0200)]
babl: do not use model.data for storing original model backpointer

Fixing bug #788471

8 years agoupdate NEWS
Øyvind Kolås [Tue, 3 Oct 2017 15:31:11 +0000 (17:31 +0200)]
update NEWS

8 years agopost-release version bump
Øyvind Kolås [Tue, 3 Oct 2017 15:17:00 +0000 (17:17 +0200)]
post-release version bump

8 years agorelease 0.1.32
Øyvind Kolås [Tue, 3 Oct 2017 15:11:44 +0000 (17:11 +0200)]
release 0.1.32

8 years agodocs: update with api changes
Øyvind Kolås [Tue, 3 Oct 2017 15:14:02 +0000 (17:14 +0200)]
docs: update with api changes

8 years agobabl: acknowledge some used trademarks
Øyvind Kolås [Tue, 3 Oct 2017 15:06:06 +0000 (17:06 +0200)]
babl: acknowledge some used trademarks

8 years agobabl: move to/from xyz and rgbtoxyz matrix functions out of babl.h
Øyvind Kolås [Tue, 3 Oct 2017 14:41:26 +0000 (16:41 +0200)]
babl: move to/from xyz and rgbtoxyz matrix functions out of babl.h

Both of these are useful, but we might want a wider range, permitting
both linear and non-linear variants to be converted to both XYZ and LAB.

The matrix is for now used in babl for the RGB->Y conversion - this might
warrant a more direct API.

8 years agobabl: rename babl_space_from_icc to babl_icc_make_space
Øyvind Kolås [Tue, 3 Oct 2017 13:54:19 +0000 (15:54 +0200)]
babl: rename babl_space_from_icc to babl_icc_make_space

Thus being more consistent that functions that take icc_data + length have the
prefix babl_icc_, since each icc space in the future potentially can have more
spaces than the relative-colorimetric space defined, _make_ seems better than
_to_ or _new_.

8 years agobabl: fix clang warnings in babl-polynomial
Ell [Tue, 3 Oct 2017 14:01:58 +0000 (10:01 -0400)]
babl: fix clang warnings in babl-polynomial

Cast the input polynomial from BablPolynomial* to
BablBigPolynomial* in the evaluator functions, so that clang
doesn't warn us about out-of-bounds access to its coefficient
array.

8 years agoHSL: make hue be set in all switch cases for rgb_to_hsl
Øyvind Kolås [Tue, 3 Oct 2017 13:53:23 +0000 (15:53 +0200)]
HSL: make hue be set in all switch cases for rgb_to_hsl

8 years agobabl: revert and clarify libtool flag for win32 builds
Edward E [Sat, 30 Sep 2017 19:32:49 +0000 (14:32 -0500)]
babl: revert and clarify libtool flag for win32 builds

8 years agobabl: improve alpha calc. in pal+alpha -> rgba conversion
Ell [Sat, 30 Sep 2017 11:44:41 +0000 (07:44 -0400)]
babl: improve alpha calc. in pal+alpha -> rgba conversion

... in particular, so that fully opaque pixels remain fully opaque

8 years agobabl: consistently use unsigned char in u8 palette conversions
Ell [Sat, 30 Sep 2017 11:42:56 +0000 (07:42 -0400)]
babl: consistently use unsigned char in u8 palette conversions

... to avoid erroneous sign extensions

8 years agosse4-int8: avoid using uninitialized variable
Øyvind Kolås [Fri, 29 Sep 2017 23:21:44 +0000 (01:21 +0200)]
sse4-int8: avoid using uninitialized variable

8 years agobabl: use -no-install to avoid libtool .sh wrappers
Øyvind Kolås [Thu, 28 Sep 2017 21:44:10 +0000 (23:44 +0200)]
babl: use -no-install to avoid libtool .sh wrappers

8 years agobabl: fix crash when doing full introspection
Øyvind Kolås [Mon, 25 Sep 2017 22:21:53 +0000 (00:21 +0200)]
babl: fix crash when doing full introspection

also add skeleton functions for introspection of trcs/spaces

8 years agobabl: do not try to enumerate sampling conversions
Øyvind Kolås [Mon, 25 Sep 2017 22:14:11 +0000 (00:14 +0200)]
babl: do not try to enumerate sampling conversions

8 years agobabl: set babl_rel_avg_error to a high value on NaN
Øyvind Kolås [Mon, 25 Sep 2017 20:46:21 +0000 (22:46 +0200)]
babl: set babl_rel_avg_error to a high value on NaN

In relation to bug #787441, if the sum of errors contain a nan the sum
is nan, we return pi as a much higher than expected average error to
indicate that this is not 0.0.

8 years agotests/grayscale_to_rgb: increase printed debug precision
Øyvind Kolås [Mon, 25 Sep 2017 19:41:36 +0000 (21:41 +0200)]
tests/grayscale_to_rgb: increase printed debug precision

8 years agotests: move non-test binaries from here to ../tools
Øyvind Kolås [Mon, 25 Sep 2017 19:06:46 +0000 (21:06 +0200)]
tests: move non-test binaries from here to ../tools

8 years agobabl: check both source/dest bits/component in bad_idea()
Øyvind Kolås [Mon, 25 Sep 2017 19:00:08 +0000 (21:00 +0200)]
babl: check both source/dest bits/component in bad_idea()

8 years agobabl: add decrease of bits per components to bad_idea()
Øyvind Kolås [Mon, 25 Sep 2017 18:56:55 +0000 (20:56 +0200)]
babl: add decrease of bits per components to bad_idea()

related to bug #787441

8 years agotests: use a epsilon instead of == for float compare
Øyvind Kolås [Mon, 25 Sep 2017 18:33:17 +0000 (20:33 +0200)]
tests: use a epsilon instead of == for float compare

8 years agobuild: link extensions against internal .la again
Øyvind Kolås [Mon, 25 Sep 2017 18:04:54 +0000 (20:04 +0200)]
build: link extensions against internal .la again

8 years agobabl: limit exported symbols
Øyvind Kolås [Mon, 25 Sep 2017 17:53:52 +0000 (19:53 +0200)]
babl: limit exported symbols

For now, also including symbols needed for internal tools and tests, that are
not part of the public API; the API promised by babl remains the public
headers, but this reduces the public dynamic loaders namespace a little.

8 years agobabl: tidying of public headers
Øyvind Kolås [Mon, 25 Sep 2017 10:56:17 +0000 (12:56 +0200)]
babl: tidying of public headers

8 years agobabl: in babl_polynomial_approximate_gamma(), verify that x0 >= 0
Ell [Sun, 24 Sep 2017 21:46:50 +0000 (17:46 -0400)]
babl: in babl_polynomial_approximate_gamma(), verify that x0 >= 0

Now that the previous commit (hopefully) makes us iPhone-proof, we
can add an assertion for this condition.  If we want to replace the
assertions with some sort of bailing, we'll need to replace the rest
of them too anyway.

8 years agoBug 788093 - Crash loading (jpg with) ICC v4 profile with parametric TRCs
Ell [Sun, 24 Sep 2017 21:34:00 +0000 (17:34 -0400)]
Bug 788093 - Crash loading (jpg with) ICC v4 profile with parametric TRCs

Fix parameter offset calculation of parametric TRCs, so that we
parse them correctry.

8 years agobabl: avoid negative degree when shrinking a zero polynomial
Ell [Sun, 24 Sep 2017 17:43:02 +0000 (13:43 -0400)]
babl: avoid negative degree when shrinking a zero polynomial

When shrinking a zero polynomial, avoid trying to set its degree
to a negative value, and just keep it at 0, which is the minimal
degree we support.

Note that this also happens for polynomials whose coefficients are
all NaN, as is the case in bug 788093, so they also become zero
polynomials after shrinking, incidentally.

8 years agobabl: make babl_space_to_icc internal, for now
Øyvind Kolås [Fri, 22 Sep 2017 12:50:48 +0000 (14:50 +0200)]
babl: make babl_space_to_icc internal, for now

Also adds an optimized 26 entry LUT, as used in the creation of
http://pippin.gimp.org/sRGBz/
 Please enter the commit message for your changes. Lines starting

8 years agobabl: remove commented out debug printfs
Øyvind Kolås [Tue, 19 Sep 2017 14:02:22 +0000 (16:02 +0200)]
babl: remove commented out debug printfs

8 years agobabl: improve icc number serialization
Øyvind Kolås [Mon, 18 Sep 2017 17:24:35 +0000 (19:24 +0200)]
babl: improve icc number serialization

8 years agobabl: add matrix re-equalization
Øyvind Kolås [Mon, 18 Sep 2017 17:17:56 +0000 (19:17 +0200)]
babl: add matrix re-equalization

This optimizes the coefficients of the matrix ensuring that a RGB 1.0 1.0 1.0
results in exactly CIE Lab 100.0 0.0 0.0 and that equal R,G,B triples yield 0.0
for CIE a, b. This is achieved by rounding to 16.16 fixed point precision,
which can be exactly represented by IEEE double, and then brute-force jittering
the coefficients +/- 1 for the best solution. This is also the rounding needed
for making the matrix well behaved when used in an ICC profile.

8 years agobabl: tidy up icc writing
Øyvind Kolås [Mon, 18 Sep 2017 00:47:52 +0000 (02:47 +0200)]
babl: tidy up icc writing

8 years agobabl: make powf approximation yield 0 for negatives
Øyvind Kolås [Sun, 17 Sep 2017 18:24:16 +0000 (20:24 +0200)]
babl: make powf approximation yield 0 for negatives

8 years agobabl: improve log output on Android.
Jehan [Wed, 5 Jul 2017 00:15:27 +0000 (02:15 +0200)]
babl: improve log output on Android.

No need to log end of lines. This is not like a printf where we are
trying to pretty-print.

8 years agobabl: replace a fprintf (stderr, ...) with babl_log().
Jehan [Tue, 4 Jul 2017 14:47:52 +0000 (16:47 +0200)]
babl: replace a fprintf (stderr, ...) with babl_log().

It will make it visible in the logcat, for instance in Android Studio.
As a general rule, we should use babl_log() for anything which we
consider as "logs", unless we want to direct them to a given output for
sure (for instance in the case of CLI tools where we want the output to
be on standard I/O in terminal, fprintf() still is the best choice).

8 years agotests: make babl build on haiku
Øyvind Kolås [Thu, 14 Sep 2017 19:24:22 +0000 (21:24 +0200)]
tests: make babl build on haiku

Using -lphtread instead of -pthread in Makefile.am fixes the build when using
gcc-x86 under haiku, figured out by schumaml.

8 years agobabl/base: model-gray, avoid potential NaN
Øyvind Kolås [Thu, 14 Sep 2017 16:32:09 +0000 (18:32 +0200)]
babl/base: model-gray, avoid potential NaN

8 years agobabl: add rendering intent argument to icc loading API
Øyvind Kolås [Fri, 8 Sep 2017 19:26:04 +0000 (21:26 +0200)]
babl: add rendering intent argument to icc loading API

8 years agobabl: abstract out TRC gamma detectors
Øyvind Kolås [Wed, 13 Sep 2017 20:08:27 +0000 (22:08 +0200)]
babl: abstract out TRC gamma detectors

8 years agobabl: babl_log() implementation for Android.
Jehan [Tue, 4 Jul 2017 14:35:46 +0000 (16:35 +0200)]
babl: babl_log() implementation for Android.

8 years agobabl: skip unknown formats when loading cache
Øyvind Kolås [Wed, 13 Sep 2017 16:04:49 +0000 (18:04 +0200)]
babl: skip unknown formats when loading cache

Fixes bug #787467.

Formats based on custom primaries provided by applications are unknown to babl
at launch, we still want to keep the data though, since this list of most used
fishes first is useful resource in combination with the warnings about missing
fast paths.

8 years agobabl: make utility file reading function non-static
Øyvind Kolås [Wed, 13 Sep 2017 13:10:07 +0000 (15:10 +0200)]
babl: make utility file reading function non-static

8 years agobabl: remove inlined implementation of powf
Øyvind Kolås [Tue, 12 Sep 2017 21:49:58 +0000 (23:49 +0200)]
babl: remove inlined implementation of powf

8 years agobabl: replace trc lut inverter with binary search
Øyvind Kolås [Tue, 12 Sep 2017 20:33:15 +0000 (22:33 +0200)]
babl: replace trc lut inverter with binary search

Much faster and much more accurate.

8 years agobabl: add icc meta-data extraction functions
Øyvind Kolås [Fri, 8 Sep 2017 19:26:04 +0000 (21:26 +0200)]
babl: add icc meta-data extraction functions

Instead of extracting all meta-data of ICC profiles and attaching them to
BablSpaces, we provide an string key/value API to query meta data of in-memory
ICC profiles.

8 years agotools: add BablPolynomial test to trc-validator.c
Ell [Sun, 10 Sep 2017 17:33:41 +0000 (13:33 -0400)]
tools: add BablPolynomial test to trc-validator.c

8 years agobabl: in BablTRC, use BablPolynomial to approximate gamma func.
Ell [Sun, 10 Sep 2017 15:38:01 +0000 (11:38 -0400)]
babl: in BablTRC, use BablPolynomial to approximate gamma func.

Use BablPolynomial to approximate gamma functions of TRCs over the
(0, 1) range, for FORMULA_GAMMA and FORMULA_SRGB TRCs.

Use generic FORMULA_GAMMA TRCs for 1.8 and 2.2 gammas, instead of
specialized versions.

8 years agobabl: add babl-polynomial.[hc]
Ell [Sun, 10 Sep 2017 15:30:56 +0000 (11:30 -0400)]
babl: add babl-polynomial.[hc]

Implements BablPolynomial, an opaque type representing a real valued
polynomial of a real variable.  Currently, exposes the following
functions:

  * babl_polynomial_eval():  Evaluates a polynomial.

  * babl_polynomial_approximate_gamma():  Calculates a polynomial
    approximation of a gamma function.

8 years agobabl: further nan prevention in babl-trc
Øyvind Kolås [Sun, 10 Sep 2017 22:41:47 +0000 (00:41 +0200)]
babl: further nan prevention in babl-trc

8 years agobabl: in babl-trc.c, fix babl_powf()
Ell [Sun, 10 Sep 2017 15:27:43 +0000 (11:27 -0400)]
babl: in babl-trc.c, fix babl_powf()

8 years agobabl: avoid accidental matrix overwrite by long names
Øyvind Kolås [Fri, 8 Sep 2017 18:26:47 +0000 (20:26 +0200)]
babl: avoid accidental matrix overwrite by long names

.. by increasing the static per space allocation to 512 bytes, these names need
to become shorter - or the name be allocated dynamically. This fixes problems
with parameterized lab / sRGB like TRCs - which yielded really long names.

8 years agobabl: protect some functions used by TRC code from NaNs
Øyvind Kolås [Fri, 8 Sep 2017 16:35:59 +0000 (18:35 +0200)]
babl: protect some functions used by TRC code from NaNs

8 years agobabl: actually reverse preceding change
Øyvind Kolås [Fri, 8 Sep 2017 16:35:16 +0000 (18:35 +0200)]
babl: actually reverse preceding change

8 years agorestore segfault for massimo
Øyvind Kolås [Fri, 8 Sep 2017 16:21:46 +0000 (18:21 +0200)]
restore segfault for massimo

8 years ago@massimo: pretty please use git :)
Øyvind Kolås [Fri, 8 Sep 2017 15:21:37 +0000 (17:21 +0200)]
@massimo: pretty please use git :)

It would be really nice if others, and prolifix people like
you, prepared git formatted patches, so that it is much saner
and easier to push and work with contributions as a maintainer
with a dirty tree, and in even more valuable bugs than this
one.. without needing to re-read and re-understand the entire
context of the fix, before fully reimplementing it.

This commit fixes bug #787441, where NaN is polluting the
computer error/tolerance.

8 years agoextensions: finish API update
Øyvind Kolås [Thu, 7 Sep 2017 17:14:55 +0000 (19:14 +0200)]
extensions: finish API update

8 years agoNEWS: aggregate news
Øyvind Kolås [Thu, 7 Sep 2017 15:46:29 +0000 (17:46 +0200)]
NEWS: aggregate news

8 years agoupdate docs
Øyvind Kolås [Thu, 7 Sep 2017 15:29:49 +0000 (17:29 +0200)]
update docs

8 years agoextensions: follow change dropping long return
Øyvind Kolås [Thu, 7 Sep 2017 14:36:14 +0000 (16:36 +0200)]
extensions: follow change dropping long return

8 years agobabl: drop long return from conversion funcs
Øyvind Kolås [Thu, 7 Sep 2017 13:48:13 +0000 (15:48 +0200)]
babl: drop long return from conversion funcs

They are propagated and instructions are spent on that, but their value are
never used. Some conversion functions in base even used the argument passed for
counting down to 0 and return 0 instead, to no ill effect.

Since we do not currently see external babl extensions, we can break extensions
API without bumping the library version, this is even a change where due to
varargs, old extensions will continue working until migrated.

8 years agobabl: remove unused static linear luts for u8 rgb space converters
Øyvind Kolås [Wed, 6 Sep 2017 23:25:33 +0000 (01:25 +0200)]
babl: remove unused static linear luts for u8 rgb space converters

8 years agoextensions: keep old algoritmic float in parallel with table
Øyvind Kolås [Wed, 6 Sep 2017 23:07:28 +0000 (01:07 +0200)]
extensions: keep old algoritmic float in parallel with table

The newly introduced table isn't bit accurate with our reference,
the ~3x faster float 2 half conversion is available with a higher
tolerance.

8 years agoextensions: fix type error in float 2 half
Øyvind Kolås [Wed, 6 Sep 2017 23:01:19 +0000 (01:01 +0200)]
extensions: fix type error in float 2 half

8 years agoextensions: make float-half extension use exact LUTs
Øyvind Kolås [Wed, 6 Sep 2017 22:29:59 +0000 (00:29 +0200)]
extensions: make float-half extension use exact LUTs

Both for conversion from half to float with a on load initialized table, and
with new tables an faster approach from qcms / mozilla / webkit.

8 years agobabl: make more use of float matrices where appropriate
Øyvind Kolås [Wed, 6 Sep 2017 21:22:18 +0000 (23:22 +0200)]
babl: make more use of float matrices where appropriate

8 years agobabl: trade gained fishing performance for better fish
Øyvind Kolås [Tue, 5 Sep 2017 11:57:50 +0000 (13:57 +0200)]
babl: trade gained fishing performance for better fish

8 years agobabl: bail early on paths that are bad ideas
Øyvind Kolås [Tue, 5 Sep 2017 01:36:22 +0000 (03:36 +0200)]
babl: bail early on paths that are bad ideas

Not going through/bench-marking chains that will make the number of components
drop below the input/output counts, and not permitting a temporary lack of
alpha both fixes bugs at higher tolerances and speeds up path selection.

8 years agobabl: add babl_fast_fish api
Øyvind Kolås [Sun, 3 Sep 2017 20:53:27 +0000 (22:53 +0200)]
babl: add babl_fast_fish api

8 years agobabl: add R'G'B' u8 color space convertors
Øyvind Kolås [Sun, 3 Sep 2017 16:36:41 +0000 (18:36 +0200)]
babl: add R'G'B' u8 color space convertors

8 years agobabl: make TRCs internal API
Øyvind Kolås [Sun, 3 Sep 2017 16:27:49 +0000 (18:27 +0200)]
babl: make TRCs internal API

8 years agobabl: add Rec2020 space
Øyvind Kolås [Sun, 3 Sep 2017 16:19:35 +0000 (18:19 +0200)]
babl: add Rec2020 space

8 years agobabl: make matrix+trc space detector generic
Øyvind Kolås [Sun, 3 Sep 2017 14:25:03 +0000 (16:25 +0200)]
babl: make matrix+trc space detector generic

8 years agobabl: abstract space duplicate detection
Øyvind Kolås [Sun, 3 Sep 2017 14:03:13 +0000 (16:03 +0200)]
babl: abstract space duplicate detection

8 years agotools: follow constness change in icc parsing error handling
Øyvind Kolås [Sun, 3 Sep 2017 13:09:57 +0000 (15:09 +0200)]
tools: follow constness change in icc parsing error handling

8 years agobabl: make error argument of babl_space_from_icc optional
Øyvind Kolås [Sun, 3 Sep 2017 13:06:37 +0000 (15:06 +0200)]
babl: make error argument of babl_space_from_icc optional

8 years agobabl: detect sRGB profiles from matrix
Øyvind Kolås [Sat, 2 Sep 2017 23:00:49 +0000 (01:00 +0200)]
babl: detect sRGB profiles from matrix

When TRCs also are matching, return internal sRGB instead of creating a
duplicate.

8 years agobabl: indentation in trc
Øyvind Kolås [Sat, 2 Sep 2017 23:00:21 +0000 (01:00 +0200)]
babl: indentation in trc

8 years agobabl: move srgb detection to srgb_formula constructor
Øyvind Kolås [Sat, 2 Sep 2017 22:50:12 +0000 (00:50 +0200)]
babl: move srgb detection to srgb_formula constructor

8 years agobabl: fix overflow detection at end of luts
Øyvind Kolås [Sat, 2 Sep 2017 20:42:05 +0000 (22:42 +0200)]
babl: fix overflow detection at end of luts

8 years agobabl: implement interpolation for lut trcs
Øyvind Kolås [Sat, 2 Sep 2017 20:30:12 +0000 (22:30 +0200)]
babl: implement interpolation for lut trcs

8 years agobabl: icc implement ascii decoding of mluc
Øyvind Kolås [Sat, 2 Sep 2017 16:18:49 +0000 (18:18 +0200)]
babl: icc implement ascii decoding of mluc